<!DOCTYPE html>
<html lang="en">

    <head>
        <meta charset="UTF-8" />
        <link rel="stylesheet" href="styles/style.css">
        <link rel="stylesheet" href="styles/theme/atom-one-dark.css">
        <title>例子49-ES6/7常用语法介绍</title>
    </head>

    <body>
        <pre>
            <code>
                // 例子49

                // main.js
                import {firstName, lastName, year, mul, Point} from './profile.js';

                function setName(element) {
                    element.textContent = firstName + ' ' + lastName;
                }

                //--------------------------------------------------------------------------

                // import-default.js
                import customName from './export-default';
                customName(); // 'foo'

                //--------------------------------------------------------------------------

                import * as circle from './circle';
                console.log('圆面积：' + circle.area(4));
                console.log('圆周长：' + circle.circumference(14));
            </code>
        </pre>
        <script src="scripts/libs/highlight.pack.js"></script>
        <script src="scripts/49.js"></script>
        <script>
            hljs.initHighlightingOnLoad();
        </script>
    </body>

</html>